package com.wujilin.okra.database.handler;

import java.util.ArrayList;
import java.util.List;

import android.database.Cursor;

import com.wujilin.okra.database.CursorHandler;
import com.wujilin.okra.model.Model;

public class ModelListHandler implements CursorHandler<List<Model>> {
	@Override
	public List<Model> handle(Cursor cursor) {
		List<Model> models = new ArrayList<Model>();
		while (cursor.moveToNext()) {
			models.add(Model.of(cursor));
		}
		return models;
	}
}
